package com.erb.config;

import com.erb.config.interceptor.IndexLoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

@Configuration
public class IndexWebMvcConfig implements WebMvcConfigurer {
	// 登录验证session拦截器
	@Resource
	private IndexLoginInterceptor indexLoginInterceptor;

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(indexLoginInterceptor)
				//.addPathPatterns("/base/**")
				.addPathPatterns("/per/**")
				.addPathPatterns("/setUser/**")
				.addPathPatterns("/pay")
				.addPathPatterns("/base/mall/detail/**")
				.addPathPatterns("/cap/**");

	}
}
